Convert string type attribute into an enumeration

The DOORS Kitchen scripts had a useful function that would convert an existing string type attribute into an enumeration type where the enumerations would be the instances of the different data that were in the string attribute. However, in DOORS version 9.3, it appears that this no longer works as it raises a number of errors that point to DOORS native include files. This was a very useful function when the values of a string attribute are repeated and it would be better to manage it as an enumeration type.

Has anyone else created a DXL script that can do this conversion?

 

Paul Miller
Melbourne, Australia


PMiller - Fri Jun 08 02:08:56 EDT 2018

Re: Convert string type attribute into an enumeration
Mike.Scharnow - Fri Jun 08 02:39:45 EDT 2018

Hi Paul,

No, I don't have such a script, but perhaps it is not so difficult to repair the scripts.

In which version did the script run and which errors do you get?

Regards
Mike

Re: Convert string type attribute into an enumeration
DeXTer - Fri Jun 08 08:14:44 EDT 2018

Hi Paul,

what errors do you receive by using the function?

Regards,

  Gerrit

Re: Convert string type attribute into an enumeration
PMiller - Tue Jun 12 23:41:11 EDT 2018

Mike.Scharnow - Fri Jun 08 02:39:45 EDT 2018

Hi Paul,

No, I don't have such a script, but perhaps it is not so difficult to repair the scripts.

In which version did the script run and which errors do you get?

Regards
Mike

Hi Mike and DeXTer,

Thanks for responding. Here is the DXL error report when I try to run the "Convert Attribute Into an Enumeration" function in the Kitchen scripts.

 

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:34> incorrect argument for (!)

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:38> syntax error

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:167> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:174> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:183> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:207> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:304> badly formed token ('" attrName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:304> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:327> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:347> badly formed token ("))

Included from:

<Line:1>

too many messages -- suspending error reporting-I- DXL: All done. Errors reported: 26. Warnings reported: 0.

 

Re: Convert string type attribute into an enumeration
Mike.Scharnow - Wed Jun 13 05:07:43 EDT 2018

PMiller - Tue Jun 12 23:41:11 EDT 2018

Hi Mike and DeXTer,

Thanks for responding. Here is the DXL error report when I try to run the "Convert Attribute Into an Enumeration" function in the Kitchen scripts.

 

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:34> incorrect argument for (!)

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:38> syntax error

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:167> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:174> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:183> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:207> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:304> badly formed token ('" attrName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:304> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:327> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:347> badly formed token ("))

Included from:

<Line:1>

too many messages -- suspending error reporting-I- DXL: All done. Errors reported: 26. Warnings reported: 0.

 

I have not had the time to make any test but I notice that your version of the kitchen scripts differs from mine, (typeName is not mentioned in my line 167 of val2type.dxl. So, I suggest to use the attached version. (I don't know whether my version is newer or older, I downloaded it from somewhere some 5 years ago)

 

Apart from this, line 34 (incorrect argument for !) is really strange, as there is only a if (!confirm "blah blah blah"). This gives me the impression that something is wrong in your DOORS installation, perhaps some overrides have gone wild.

 

Perhaps it might be a better idea not to store the kitchen files directly in your DOORS_HOME-directory but somewhere else.


Attachments

kitchen.zip

Re: Convert string type attribute into an enumeration
DeXTer - Wed Jun 13 07:51:30 EDT 2018

PMiller - Tue Jun 12 23:41:11 EDT 2018

Hi Mike and DeXTer,

Thanks for responding. Here is the DXL error report when I try to run the "Convert Attribute Into an Enumeration" function in the Kitchen scripts.

 

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:34> incorrect argument for (!)

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:38> syntax error

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:167> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:174> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:183> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:207> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:304> badly formed token ('" attrName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:304> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:327> badly formed token ('" typeName "')

Included from:

<Line:1>

-E- DXL: <C:\Program Files (x86)\IBM\Rational\DOORS\9.3/lib/dxl/addins/kitchen/Attributes/val2type.dxl:347> badly formed token ("))

Included from:

<Line:1>

too many messages -- suspending error reporting-I- DXL: All done. Errors reported: 26. Warnings reported: 0.

 

Did you modify the kitchen tools ?

Maybe you inserted a quotation mark (") in line 38.

Or did you remove any code in the lines 34ff ?

 

I found typeName for example in line 189 of the kitchen tools:

ack "Could not delete type '" typeName "': " errmsg